<?php
namespace Yzadmin\Model;
use Think\Model\RelationModel;

class JiakuanModel extends RelationModel {
      //定义主表的表名称
protected $tableName='jiakuan_log';    
protected $_link = array(
  'jiakuan_xiaji_log' => array(   
   'mapping_type'   => self::HAS_MANY,   
    'class_name'    => 'jiakuan_xiaji_log',    
    'foreign_key'   => 'jiakuan_log_id',    
    'mapping_name'  => 'jiakuan_xiaji_log',   
    'mapping_order' => 'id asc',    

     ),
  );
 }

?>